package com.edu.service.foodtype;

import com.edu.dao.FoodTypeDao;
import com.edu.entity.FoodType;
import com.edu.utils.PageList;
import com.edu.utils.PageParam;

import java.sql.SQLException;
import java.util.List;

/**
 * @author ZCN
 * @version 1.0
 * @date 2021/11/19 14:17
 */
public class FoodTypeServiceImpl implements FoodTypeService {

    private FoodTypeDao foodTypeDao = new FoodTypeDao();


    @Override
    public PageList pageList(PageParam pageParam) throws Exception{
        return foodTypeDao.pageList(pageParam);
    }
    @Override
    public List<FoodType> findAll() throws SQLException{
        return foodTypeDao.findAll();
    }

    @Override
    public List<Object> findAll1() throws SQLException {
        return foodTypeDao.findAll1();
    }
    @Override
    public FoodType findOne(Integer id) throws SQLException{
        return foodTypeDao.findOne(id);
    }

    @Override
    public void update(FoodType foodType) throws SQLException {
        foodTypeDao.update(foodType);
    }

    @Override
    public void delete(Integer id) throws SQLException {
        foodTypeDao.delete(id);
    }

    @Override
    public void insert(FoodType foodType) throws SQLException {
        foodTypeDao.insert(foodType);
    }

}
